import { ApiPrefixEnum } from '@/enums'
import { get, post } from '@/utils/http'

export interface MenuItem {
  id: string
  menuName: string
  menuType: string
  menuTypeDesc: string | null
  menuVisible: boolean
  menuTitle: string
  menuIcon: string | null
  parentId: string
  parentIds: string | null
  platform: string
  orderNum: number
  menuPath: string
  menuComponent: string
  menuKey: string | null
  menuStatus: boolean
  meta: {
    Intl: string
  }
  children: MenuItem[] | null
}
export const userApis = {
  login: (data: any) => post<IUserInfo>(`${ApiPrefixEnum.SERVICE}/security/person/login`, data),
  getMenuList: () => get<MenuItem[]>(`${ApiPrefixEnum.SERVICE}/qy/ops/menu/console/tree`),
}
